package com.ruoyi.business.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CustomerLawyerMapper;
import com.ruoyi.business.domain.CustomerLawyer;
import com.ruoyi.business.service.ICustomerLawyerService;

/**
 * customerService业务层处理
 * 
 * @author liwenjing
 * @date 2021-04-28
 */
@Service
public class CustomerLawyerServiceImpl implements ICustomerLawyerService 
{
    @Autowired
    private CustomerLawyerMapper customerLawyerMapper;

    /**
     * 查询customer
     * 
     * @param id customerID
     * @return customer
     */
    @Override
    public CustomerLawyer selectCustomerLawyerById(Long id)
    {
        return customerLawyerMapper.selectCustomerLawyerById(id);
    }

    /**
     * 查询customer列表
     * 
     * @param customerLawyer customer
     * @return customer
     */
    @Override
    public List<CustomerLawyer> selectCustomerLawyerList(CustomerLawyer customerLawyer)
    {
        return customerLawyerMapper.selectCustomerLawyerList(customerLawyer);
    }

    /**
     * 新增customer
     * 
     * @param customerLawyer customer
     * @return 结果
     */
    @Override
    public int insertCustomerLawyer(CustomerLawyer customerLawyer)
    {
        return customerLawyerMapper.insertCustomerLawyer(customerLawyer);
    }

    /**
     * 修改customer
     * 
     * @param customerLawyer customer
     * @return 结果
     */
    @Override
    public int updateCustomerLawyer(CustomerLawyer customerLawyer)
    {
        return customerLawyerMapper.updateCustomerLawyer(customerLawyer);
    }

    /**
     * 批量删除customer
     * 
     * @param ids 需要删除的customerID
     * @return 结果
     */
    @Override
    public int deleteCustomerLawyerByIds(Long[] ids)
    {
        return customerLawyerMapper.deleteCustomerLawyerByIds(ids);
    }

    /**
     * 删除customer信息
     * 
     * @param id customerID
     * @return 结果
     */
    @Override
    public int deleteCustomerLawyerById(Long id)
    {
        return customerLawyerMapper.deleteCustomerLawyerById(id);
    }

    /**
     * 查询所有的律师
     * @return
     */
    @Override
    public List<SysUser> selectAllLawyer() {
        return customerLawyerMapper.selectAllLawyer();
    }
}
